package com.bird.设计模式.创建型.单例模式.容器单例模式;

/**
 * @data 2022/2/28 17:34
 * @author: bird
 * @description: 异步执行的任务
 */
public class T implements Runnable {
    @Override
    public void run() {
        // 往容器中存放实例
        ContainerSingleton.putInstance("object", new Object());
        Object instance = ContainerSingleton.getInstance("object");
        System.out.println(Thread.currentThread().getName() + " " + instance);
    }
}
